package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * RcAccionTramite generated by hbm2java
 */
@Entity
@Table(name = "RC_ACCION_TRAMITE", schema = "RUC")
public class RcAccionTramite implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6411519116451137921L;
	private RcAccionTramiteId id;
	private TbTramite tbTramite;
	private String bimprime;
	private String tipotarjeta;

	public RcAccionTramite() {
	}

	public RcAccionTramite(RcAccionTramiteId id, TbTramite tbTramite) {
		this.id = id;
		this.tbTramite = tbTramite;
	}

	public RcAccionTramite(RcAccionTramiteId id, TbTramite tbTramite,
			String bimprime, String tipotarjeta) {
		this.id = id;
		this.tbTramite = tbTramite;
		this.bimprime = bimprime;
		this.tipotarjeta = tipotarjeta;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "cgestion", column = @Column(name = "C_GESTION", nullable = false, length = 1)),
			@AttributeOverride(name = "ctramite", column = @Column(name = "C_TRAMITE", nullable = false, length = 3)),
			@AttributeOverride(name = "accionreg", column = @Column(name = "ACCION_REG", nullable = false, length = 3)) })
	public RcAccionTramiteId getId() {
		return this.id;
	}

	public void setId(RcAccionTramiteId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns( {
			@JoinColumn(name = "C_GESTION", referencedColumnName = "C_GESTION", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "C_TRAMITE", referencedColumnName = "C_TRAMITE", nullable = false, insertable = false, updatable = false) })
	public TbTramite getTbTramite() {
		return this.tbTramite;
	}

	public void setTbTramite(TbTramite tbTramite) {
		this.tbTramite = tbTramite;
	}

	@Column(name = "B_IMPRIME", length = 1)
	public String getBimprime() {
		return this.bimprime;
	}

	public void setBimprime(String bimprime) {
		this.bimprime = bimprime;
	}

	@Column(name = "TIPO_TARJETA", length = 1)
	public String getTipotarjeta() {
		return this.tipotarjeta;
	}

	public void setTipotarjeta(String tipotarjeta) {
		this.tipotarjeta = tipotarjeta;
	}

}
